﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using ImageCom.ImageEn;
using ImageCom.LeadtoolEx;
using DevExpress.XtraPrinting;
using System.IO;

namespace Small.PinBan.FrmControl
{
    public partial class XtraReportProduct2 : DevExpress.XtraReports.UI.XtraReport
    {
        public XtraReportProduct2()
        {
            InitializeComponent();
        }

        public XtraReportProduct2(string imgpath, string orderProductId, string orderName, string photoid, string PhotoName)
        {         
            InitializeComponent();
            try
            {
                if (!string.IsNullOrEmpty(imgpath))
                {
                    if (File.Exists(imgpath))
                    {
                        pic_Box.Image = LDEx.ToMaxSimpleGrayImage(imgpath, 400, 400);  //图片
                    }
                }
            }
            catch (Exception ex)
            {
               throw(ex);
            }

            lbl_OrderInfoCode.Text = "*" + orderProductId + "*";
            lbl_OrderName.Text = orderName;

            lbl_photoidCode.Text = "*" + photoid + "*";
            lbl_photoid.Text = photoid;
            lbl_PhotoName.Text = PhotoName;
        }
    }
}
